/// Coder: Jose Ricardo Mello Viana - zezim - 2008
/// Bugs? e-mail me: zezim.ricardo@gmail.com

#ifndef ANIMATOR_H_
#define ANIMATOR_H_

#include "skeleton.h"
#include "motion.h"

class Animator {
public:
   /// Constructor default
   Animator();
   
   /// Constructor parsing skeleton and motion
   /// @param *s given skeleton
   /// @param *m given motion
   Animator(Skeleton *s, Motion *m);
   
   /// Destructor default
   virtual ~Animator();
   
   /// Get the previous pose of animation
   /// @return (currentFrame - 1)'th pose of animation
   void prev();
   
   /// Get the next pose of animation
   /// @return (currentFrame + 1)'th pose of animation
   void next();
   
   /// Get the first pose of animation
   /// @return first pose of animation
   void first();
   
   /// Get the last pose of animation
   /// @return last pose of animation
   void last();
   
   /// Get the f'th pose of animation
   /// @return f'th pose of animation
   void frame(int f);
   
private:
   Skeleton             *skeleton; /// The current skeleton (viewed on opengl)
   Skeleton             *skeletonIni; /// The initial skeleton
   vector<Skeleton>     skeletons;
   Motion               *motion;
   int                  currentFrame;
};

#endif /*ANIMATOR_H_*/
